package model.data
{
	import flash.filesystem.File;
	import flash.filesystem.FileMode;
	import flash.filesystem.FileStream;

	public class BaseData
	{
		public function BaseData()
		{
		}
		
		public function load():void
		{
			var file:File = store;
			var stream:FileStream = new FileStream;
				stream.open(file, FileMode.READ);
			var data:String = stream.readUTFBytes(stream.bytesAvailable);
				stream.close();
				
			process(data);			
		}
		
		protected function process(data:String):void
		{
			throw "Override me";			
		}
		
		protected function get store():File
		{
			return File.applicationDirectory.resolvePath("assets");
		}
	}
}